/**
 * @Description:
 * @Author 卞鹏飞 <228443632@qq.com>
 * @create 06/02/25 PM6:59
 */

import type { ObjectValueType } from '@/cli/generic-kit.ts'

/**
 * boxen配置
 */
export const BOXEN_OPTS = {
  padding: 1,
  align: 'center',
  borderColor: 'yellow',
  borderStyle: 'round'
}

/**
 * ora loading
 */
export const ORA_SPINNER = {
  interval: 80,
  frames: ['   ⠋', '   ⠙', '   ⠚', '   ⠞', '   ⠖', '   ⠦', '   ⠴', '   ⠲', '   ⠳', '   ⠓']
}

/**
 * 默认目录名称
 */
export const DEFAULT_DIR = 'pc-app'

/**
 * cli 名称
 */
export const CLI_NAME = 'zsamc-cli'

/**
 * app 类型模版
 */
export const APP_TYPE = {
  h5: 'h5',
  pc: 'pc',
  cfMange: 'cfMange' // 个贷模版
}

/**
 * app 类型模版 仓库地址
 */
export const APP_TYPE_REPOSITORY = {
  pc: 'https://gitee.com/bianpengfei/admin-template.git',
  h5: 'https://github.com/228443632/znz-h5-template',
  cfMange: 'https://gitee.com/bianpengfei/zsamc-pc-template-newcore.git'
}

/**
 * 包安装类型
 */
export const INSTALL_TYPE = {
  npm: 'npm',
  yarn: 'yarn',
  pnpm: 'pnpm'
} as const

export type InstallType = ObjectValueType<typeof INSTALL_TYPE>

/**
 * 缓存目录
 */
export const CACHE_DIR = '.zsamc-cli-cache'
